<%@page contentType="text/html; charset=utf-8"%>
<!DOCTYPE html>
<html>
<head>
    <title>创业武汉合伙人</title>
    <%@include file="common/header.jsp"%>
</head>
<body>
<!-- page 容器 -->
<div class="page">
    <!-- 标题栏 -->
    <header class="bar bar-nav bgcolor nobottom">
        <button class="button button-link button-nav whitecolor pull-left" href="${ctx}/m/index.do">
            <span class="icon icon-left"></span>

        </button>
        <%@include file="common/headerPic.jsp" %>
        <h1 class="title whitecolor">我管理的活动</h1>
    </header>

    <!-- 这里是页面内容区 -->
    <div class="content whitebg infinite-scroll" data-distance="100">
        <div class="buttons-tab">
            <a href="#tab1" class="tab-link active button">待审核</a>
            <a href="#tab2" class="tab-link button">待考核</a>
            <a href="#tab3" class="tab-link button">已考核</a>
        </div>
        <div class="tabs">
            <div id="tab1" class="tab active graycolor">
                <div class="contentList" data-totalPage="${approvePager.totalPage}" data-pageNum="2">
                    <div class="live">
                        <a class="live-content toDetail" href="">
                        <div class="live-left"><img class="mainPicUrl lazy" src="images/empty.png" data-original="${Dict.prefix('UPLOAD')}${activity.mainPicUrl}"></div>
                        <i class="fa fa-play-circle-o play" aria-hidden="true"></i>
                            <div class="live-center">
                            <div class="row_nowrap cyzjTitle"></div>
                            <%--<c:if test="${activity.guestNames!='' && activity.guestNames!=null}">--%>
                            <div class="row_nowrap little_size cyzjGuest"></div>
                            <%--</c:if>--%>
                            <div class=" row_nowrap little_size dwName"></div>
                            <div class="row_nowrap little_size gray cyzjStartTimeStr"></div>
                            <div class="row_nowrap little_size gray blue">查看详情</div>
                            </div>
                        </a>
                    </div>
                </div>
                <!-- preloader -->
                    <div class="infinite-scroll-preloader">
                        <div class="preloader"></div>
                    </div>
            </div>

            <div id="tab2" class="tab">
                <div class="contentList" data-totalPage="${nowPager.totalPage}" data-pageNum="2">

                </div>
                <!-- preloader -->
                    <div class="infinite-scroll-preloader">
                        <div class="preloader"></div>
                    </div>
            </div>

            <div id="tab3" class="tab" >
                <div class="contentList" data-totalPage="${activityPager.totalPage}" data-pageNum="2">

                </div>
                <!-- preloader -->
                    <div class="infinite-scroll-preloader">
                        <div class="preloader"></div>
                    </div>
            </div>

        </div>

    </div>
</div>



<%@include file="common/panel.jsp"%>
</body>
</html>
<%@include file="common/footer.jsp"%>
<%@include file="common/nav_header_new.jsp"%>
<script>
    $.init();
    initTab();
    var objBase = $("#tab1 .contentList > .live").eq(0).clone();
    var contentList = $(".tab > .contentList");
    contentList.empty();


    var loading = false;

    function addItems(data,content) {
        $.each(data.resultList,function(){
            var obj = objBase.clone();

            obj.find(".cyzjTitle").text(this.activityName);
            if (this.guestNames != '' && this.guestNames != null) {
                obj.find(".cyzjGuest").text("嘉宾:" + this.guestNames);
            }
            obj.find(".dwName").text("承办单位："+this.dwName);
            obj.find(".mainPicUrl").attr("data-original","${Dict.prefix('UPLOAD')}"+this.mainPicUrl);
            obj.find(".cyzjStartTimeStr").text((new Date(this.beginTime)).Format("yyyy-MM-dd hh:mm"));
            obj.find(".toDetail").attr("href","activityDetail.do?id="+this.id);

            content.append(obj);
        });
        lazyLoad();
        var pageNum = parseInt(content.attr("data-pageNum"))+1;
        content.attr("data-pageNum",pageNum);
    }

    function queryUrl(){
        var isTab1 = $("#tab1").hasClass("active");
        var isTab2 = $("#tab2").hasClass("active");
        if(isTab1) {
            return "activityPager.do?map.approveStatus=SUBMITED&map.user_I=admin";
        }else if(isTab2){
            return "activityPager.do?map.approveStatus=APPROVED&map.user_I=admin";//&map.processStatus=running
        }else{
            return "activityPager.do?map.approveStatus=APPROVED&map.user_I=admin";
        }
    }


    contentList = $(".tab.active >.contentList");
    ajaxTODO(null,contentList,true);

</script>